package com.imooc.product.exception;

import com.imooc.product.enums.ResultEnum;

/**
 * @Name com.imooc.product.exception.ProductException
 * @Description
 * @Author Elwyn
 * @Version 2020/3/17
 * @Copyright 上海云辰信息科技有限公司
 **/
public class ProductException extends RuntimeException {
	private Integer code;

	public ProductException( Integer code,String message) {
		super(message);
		this.code = code;
	}
	public ProductException(ResultEnum resultEnum) {
		super(resultEnum.getMessage());

		this.code = resultEnum.getCode();
	}
}
